package com.aaa.eat.controller;

import com.aaa.eat.pojo.vo.Yonghu;
import com.aaa.eat.result.AjaxResult;
import com.aaa.eat.service.RegisterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Author:张海金
 * Description:T0D0
 * DateTime:2022/2/5 18:13
 **/
@RestController
@RequestMapping("register")
public class RegisterController {

    @Autowired
    private RegisterService registerService;

    @RequestMapping("sendCode")
    public AjaxResult sendCode(String telephone){
        return registerService.sendCode(telephone);
    }
    @RequestMapping("add")
    public AjaxResult add(Yonghu yonghu){
        return registerService.add(yonghu);
    }

}
